import Vue from 'vue'
import VueRouter from 'vue-router'
import KafkaConfigManager from '../views/KafkaConfigManager.vue'
import JsonParser from '../views/JsonParser.vue'
import KafkaRealtime from '../views/KafkaRealtime.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/kafka-config'
  },
  {
    path: '/kafka-config',
    name: 'KafkaConfigManager',
    component: KafkaConfigManager
  },
  {
    path: '/json-parser',
    name: 'JsonParser',
    component: JsonParser
  },
  {
    path: '/kafka-realtime',
    name: 'KafkaRealtime',
    component: KafkaRealtime
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router